package cn.com.nes.site.controller.marketing.activity;

import cn.com.nes.common.web.CommonResult;
import cn.com.nes.site.controller.marketing.activity.vo.ActivityTemplateQueryVO;
import cn.com.nes.site.service.marketing.ActiveSessionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Api(tags = {"营销管理-活动管理"})
@Controller
@RequestMapping("/v2/marketing/activity")
public class ActivityController {

    @Resource
    private ActiveSessionService activeSessionService;

    @ApiOperation("获取活动模版信息")
    @RequestMapping(value = "getActivityTemplateInfo", method = RequestMethod.GET)
    public @ResponseBody CommonResult<?> getActivityTemplateInfo(ActivityTemplateQueryVO activityTemplateQueryVO) throws Exception {
        return CommonResult.data(activeSessionService.getActivityTemplateInfo(activityTemplateQueryVO.convertToBo()));
    }

}
